/**
 * @file wa_screen.h
 *
 */

#ifndef _WA_SCREEN_H
#define _WA_SCREEN_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
*      INCLUDES
*********************/
#include "wa_conf.h"
#if USE_WA_WIN != 0
#include <string.h>
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "wa_area.h"
#include "wa_obj.h"
#include "wa_mask_draw.h"
#include "wa_wm.h"
#include "wa_win.h"
#include "wa_ll.h"
#include "wa_malloc.h"
/*********************
*      DEFINES
*********************/

/**********************
*      TYPEDEFS
**********************/

typedef enum
{
	WA_SCREEN_SWITCH_TYPE_NOANIM = 1,
#if USE_WA_ANIM != 0
	WA_SCREEN_SWITCH_TYPE_BLINDS_HOR,
	WA_SCREEN_SWITCH_TYPE_BLINDS_VER,
	WA_SCREEN_SWITCH_TYPE_BOXS_HOR,
	WA_SCREEN_SWITCH_TYPE_BOXS_VER,

	WA_SCREEN_SWITCH_TYPE_TOP_MOVE_ENTER,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_MOVE_ENTER,
	WA_SCREEN_SWITCH_TYPE_LEFT_MOVE_ENTER,
	WA_SCREEN_SWITCH_TYPE_RIGHT_MOVE_ENTER,

	WA_SCREEN_SWITCH_TYPE_TOP_MOVE_QUIT,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_MOVE_QUIT,
	WA_SCREEN_SWITCH_TYPE_LEFT_MOVE_QUIT,
	WA_SCREEN_SWITCH_TYPE_RIGHT_MOVE_QUIT,

	WA_SCREEN_SWITCH_TYPE_TOP_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_LEFT_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_TOP_LEFT_SIZE_ENTER,

	WA_SCREEN_SWITCH_TYPE_TOP_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_LEFT_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_TOP_LEFT_SIZE_QUIT,

	WA_SCREEN_SWITCH_TYPE_BOTTOM_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_RIGHT_SIZE_ENTER,

	WA_SCREEN_SWITCH_TYPE_BOTTOM_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_RIGHT_SIZE_QUIT,

	WA_SCREEN_SWITCH_TYPE_TOP_RIGHT_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_LEFT_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_RIGHT_SIZE_ENTER,

	WA_SCREEN_SWITCH_TYPE_TOP_RIGHT_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_LEFT_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_RIGHT_SIZE_QUIT,

	WA_SCREEN_SWITCH_TYPE_CENTER_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_CENTER_SIZE_QUIT,

	WA_SCREEN_SWITCH_TYPE_CENTER_HV_SIZE_ENTER,
	WA_SCREEN_SWITCH_TYPE_CENTER_VH_SIZE_ENTER,

	WA_SCREEN_SWITCH_TYPE_CENTER_HV_SIZE_QUIT,
	WA_SCREEN_SWITCH_TYPE_CENTER_VH_SIZE_QUIT,

	WA_SCREEN_SWITCH_TYPE_TOP_TOGETHER,
	WA_SCREEN_SWITCH_TYPE_BOTTOM_TOGETHER,
	WA_SCREEN_SWITCH_TYPE_LEFT_TOGETHER,
	WA_SCREEN_SWITCH_TYPE_RIGHT_TOGETHER,

#endif
}wa_screen_switch_type;

typedef struct
{
	wa_obj* win;
	uint32_t id;
	void (*create)(void);
	void (*del)(void);
}wa_screen_obj;

/**********************
* GLOBAL PROTOTYPES
**********************/

void wa_screen_module_init(void);
void wa_screen_add(wa_screen_obj* scr);
void wa_screen_goto_homepage(uint32_t id);
void wa_screen_switch(uint32_t dst_id, wa_screen_switch_type type, uint32_t time_long, wa_result src_edge, wa_result dst_edge);

/**********************
*      MACROS
**********************/

#endif

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif


